<template>
	<view class="container">
		<!-- 订单详情页面 -->
		<view class="contant">
			<!-- 订单状态 -->
			<view class="orderState">
				<view class="orderText">
					订单号:
				</view>
				<view class="orderNum">
					{{orderList.orderNo}}
				</view>
			</view>
			<view class="orderStates">
				<view class="orderTextone">
					订单状态:
				</view>
				<view>
					{{orderList.orderStatus ? orderList.orderStatus:'暂无'}}
				</view>
			</view>
			<!-- 预定信息 -->
			<view class="orderMessage">
				预定信息
			</view>
			<!-- 酒店名称 -->
			<view class="hotalMessage">
				<view class="hotalName">
					酒店名称:
				</view>
				<view class="">
					{{orderList.jdName ? orderList.jdName:'暂无'}}
				</view>
			</view>
			<!-- 房型名称 -->
			<view class="roomMessage">
				<view class="roomName">
					房型名称:
				</view>
				<view class="">
					{{orderList.jdfxName}}
				</view>
			</view>
			<!-- 入离时间 -->
			<view class="residenceLength">
				<view class="residenceTimeLeft">
					入住时间:
				</view>
				<view class="residenceTimeCenter">
					{{orderList.enterTime? orderList.enterTime : '暂无'}}
				</view>
			</view>
			<!-- 入离时间 -->
			<view class="residenceLength">
				<view class="residenceTimeLeft">
					离开时间:
				</view>
				<view class="residenceTimeRight">
					{{orderList.leaveTime ? orderList.leaveTime : '暂无'}}
				</view>
			</view>
			<!-- 间数 -->
			<view class="roomNums">
				<view class="roomCounts">
					间数:
				</view>
				<view class="">
					{{orderList.jianshu ? orderList.jianshu:'暂无'}}
				</view>
			</view>
			<!-- 购买时间 -->
			<view class="payMessage">
				<view class="payTime">
					购买时间:
				</view>
				<view class="">
					{{orderList.gmTime}}
				</view>
			</view>
			<!-- 购买平台 -->
			<view class="payFlat">
				<view class="flatForm">
					购买平台:
				</view>
				<view class="">
					{{orderList.gmPt}}
				</view>
			</view>
			<!-- 财务信息 -->
			<view class="financial">
				财务信息
			</view>
			<!-- 底价总额 -->
			<view class="floorMessage">
				<view class="floorPrice">
					底价总额:
				</view>
				<view class="priceStates">
					<view class="floorPriceOne">
						￥{{orderList.djzePrice}}
					</view>
					<view class="floorPriceTwo">

					</view>
					<view class="floorPriceThree">
						预付
					</view>
				</view>
			</view>
			<!-- 底价构成 -->
			<view class="floorPriceForm">
				<view class="floorPriceText">
					底价构成:
				</view>
				<view class="floorPriceContent">
					<view class="floorPriceLeft">
						￥{{orderList.djgc}}
					</view>
				</view>
				<!-- <uni-icons type="bottom" size="20"></uni-icons> -->
			</view>
			<!-- 促销费用 -->
			<view class="promotionMessage">
				<view class="promotionLeft">
					促销费用
				</view>
				<view class="promotionCenter">
					￥{{orderList.cxfy}}(商家承担)
				</view>
				<view class="promotionRight">

				</view>
			</view>
			<!-- 底价奖励金额 -->
			<view class="amountPrice">
				<view class="amountPriceLeft">
					<view class="leftDiv">
						底价奖励金额:
					</view>
				</view>
				<view class="rightDiv">
					<view class="amountPriceCenter">
						￥{{orderList.djjlPrice}}
					</view>
					<view class="amountPriceRight">
					</view>
				</view>
			</view>
			<!-- 入住信息 -->
			<view class="checkInformation">
				入住信息:
				<view style="margin-left: 25rpx;">
					暂无
				</view>
			</view>
			<!-- 入住人 -->
			<view class="guestMessage">
				<view class="guestPersonLeft">
					入住人:
				</view>
				<view class="guestPersonCenter">
					{{orderList.ruzhuren}}
				</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	import {
		getDetailById
	} from '@/api/order.js'
	export default {
		data() {
			return {
				orderList: [],
				options: null
			}
		},
		onLoad(e) {
			this.options = e
			this.getDetail()
		},
		methods: {
			//订单详情
			getDetail() {
				getDetailById({
					id: this.options.id
				}).then(res => {
					console.log(455444, res)
					this.orderList = res.data
				})
			},
			goBack() {
				//跳转返回到订单页面
				uni.switchTab({
					url: '/pages/ordergoods/index'
				})
			}
		}
	}
</script>

<style lang="scss">
	.container {
		position: fixed;
		padding: 0 15rpx;
		width: 100%;
		height: 100vh;
		box-sizing: border-box;
		background-color: #ffe1c2;

		// 顶部样式
		.top {
			width: 100%;
			height: 100rpx;
			background-color: #f7f7f7;
			margin-top: 50rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1rpx solid #efefef;

			.topLeft {
				width: 150rpx;
				display: flex;
			}

			.topCenter {
				font-size: 30rpx
			}

			.topRight {
				width: 150rpx;
				background-color: pink;
			}
		}

		//主题样式
		.contant {
			margin-top: 10rpx;
			width: 100%;
			height: 100vh;
			font-size: 30rpx;
			border-radius: 10rpx;
			margin-bottom: 10rpx;

			//订单号
			.orderState {
				width: 100%;
				height: 70rpx;
				display: flex;
				align-items: center;
				background-color: rgba(255, 255, 255, .5);
				border-radius: 15rpx;
				border-bottom: 2rpx solid #efefef;
				border-radius: 20rpx 20rpx 0 0;
				box-shadow: 0rpx 0rpx 0rpx 1rpx rgba(0, 0, 0, 0.2);

				.orderText {
					width: 150rpx;
					padding-left: 20rpx;
					// height: 100%;
					// background-color: #fff;
				}

				.orderNum {
					color: red;
				}
			}
		}

		//订单状态
		.orderStates {
			display: flex;
			width: 100%;
			height: 70rpx;
			background-color: rgba(255, 255, 255, .5);
			align-items: center;

			.orderTextone {
				width: 150rpx;
				padding-left: 20rpx;
			}
		}

		//预定信息
		.orderMessage {
			width: 100%;
			height: 70rpx;
			padding-left: 20rpx;
			line-height: 70rpx;
		}

		// 酒店名称
		.hotalMessage {
			width: 100%;
			height: 70rpx;
			display: flex;
			background-color: rgba(255, 255, 255, .5);
			align-items: center;
			border-bottom: 2rpx solid #efefef;

			.hotalName {
				width: 150rpx;
				padding-left: 20rpx;
			}
		}

		// 房型名称
		.roomMessage {
			height: 70rpx;
			display: flex;
			align-items: center;
			border-bottom: 2rpx solid #efefef;
			background-color: rgba(255, 255, 255, .5);

			// background-color: cadetblue;
			.roomName {
				width: 150rpx;
				padding-left: 20rpx;
			}
		}

		//入离时间
		.residenceLength {
			// width: 100%;
			height: 70rpx;
			display: flex;
			align-items: center;
			border-bottom: 2rpx solid #efefef;
			background-color: rgba(255, 255, 255, .5);

			// background-color: #fff;
			.residenceTimeLeft {
				width: 150rpx;
				padding-left: 20rpx;
			}

			// .residenceTimeRight {
			// 	margin-left: 10rpx;
			// }
		}

		//间数
		.roomNums {
			height: 70rpx;
			padding-left: 20rpx;
			display: flex;
			align-items: center;
			border-bottom: 2rpx solid #efefef;
			background-color: rgba(255, 255, 255, .5);

			.roomCounts {
				width: 150rpx;
			}
		}

		//购买时间
		.payMessage {
			height: 70rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			background-color: rgba(255, 255, 255, .5);

			.payTime {
				width: 150rpx;
			}
		}

		//购买平台
		.payFlat {
			height: 70rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			background-color: rgba(255, 255, 255, .5);

			.flatForm {
				width: 150rpx;
			}
		}

		//财务信息
		.financial {
			height: 70rpx;
			display: flex;
			padding-left: 20rpx;
			align-items: center;
		}

		// 底价总额
		.floorMessage {
			height: 70rpx;
			display: flex;
			background-color: rgba(255, 255, 255, .5);
			justify-content: space-between;
			align-items: center;
			padding-left: 20rpx;
			border-bottom: 2rpx solid #efefef;

			.floorPrice {
				width: 150rpx;
			}

			.priceStates {
				flex: 1;
				display: flex;
				align-items: center;

				.floorPriceOne {
					color: red;
				}

				.floorPriceTwo {
					margin-left: 10rpx;
					font-size: 24rpx;
					color: #e1dfe0;
					text-decoration: line-through;
				}

				.floorPriceThree {
					color: red;
					font-size: 26rpx;
					margin-left: 10rpx;
				}
			}

		}

		//底价构成
		.floorPriceForm {
			height: 70rpx;
			background-color: rgba(255, 255, 255, .5);
			display: flex;
			padding-left: 20rpx;
			align-items: center;
			justify-content: space-between;
			border-bottom: 2rpx solid #efefef;

			.floorPriceText {
				width: 150rpx;
				height: 60rpx;
				line-height: 60rpx;
			}

			.floorPriceContent {
				flex: 1;
				background-color: rgba(255, 255, 255, .5);
				display: flex;

				.floorPriceCenter {
					margin-left: 7rpx;
				}

				.floorPriceLast {
					margin-left: 5rpx;
				}
			}

			.floorPriceRight {
				width: 70rpx;
				height: 70rpx;
				text-align: center;
				line-height: 70rpx;
				background-color: rgba(255, 255, 255, .5);
			}
		}

		// 促销费用
		.promotionMessage {
			height: 70rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			background-color: rgba(255, 255, 255, .5);
			border-bottom: 2rpx solid #efefef;

			.promotionLeft {
				width: 150rpx;
			}

			.promotionRight {
				color: #a270ce;
				margin-left: 20rpx;
			}
		}

		//底价奖励金额
		.amountPrice {
			height: 100rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			background-color: rgba(255, 255, 255, .5);
			border-bottom: 2rpx solid #efefef;

			.amountPriceLeft {
				width: 150rpx;

				.leftDiv {
					width: 120rpx;
				}
			}

			.rightDiv {
				flex: 1;
				display: flex;
				justify-content: space-between;

				.amountPriceRight {
					color: #e2946b;
				}
			}
		}

		//入住信息
		.checkInformation {
			height: 70rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			background-color: rgba(255, 255, 255, .5);
			border-bottom: 2rpx solid #efefef;
		}

		//入住人
		.guestMessage {
			height: 70rpx;
			background-color: rgba(255, 255, 255, .5);
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			border-radius: 0 0 20rpx 20rpx;
			box-shadow: 1rpx 5rpx 1rpx 3rpx rgba(0, 0, 0, 0.1);
			border-bottom: 2rpx solid #efefef;

			.guestPersonLeft {
				width: 150rpx;
			}

			.guestPersonRight {
				margin-left: 20rpx;
				color: #937ee8;
			}
		}
	}
</style>